import { EntitySchema } from '@mikro-orm/core';

export class ImsYzdKpHelp {
  id!: number;
  title?: unknown;
  content?: unknown;
  sort?: number;
  state?: boolean;
  view: number = 0;
  uniacid!: number;
  helpNum: number = 0;
  nohelpNum: number = 0;
  addTime?: string;
  updateTime?: string;
}

export const ImsYzdKpHelpSchema = new EntitySchema({
  class: ImsYzdKpHelp,
  properties: {
    id: { primary: true, type: 'number' },
    title: { type: 'unknown', columnType: 'longtext', nullable: true },
    content: { type: 'unknown', columnType: 'longtext', nullable: true },
    sort: { type: 'number', nullable: true },
    state: { type: 'boolean', nullable: true },
    view: { type: 'number', default: 0 },
    uniacid: { type: 'number', index: 'uniacid' },
    helpNum: { type: 'number', default: 0 },
    nohelpNum: { type: 'number', default: 0 },
    addTime: { type: 'string', length: 255, nullable: true },
    updateTime: { type: 'string', length: 255, nullable: true },
  },
});
